//
//  MainTabBarController.m
//  UIComprehensive
//
//  Created by lanou3g on 16/1/25.
//  Copyright © 2016年 徐强. All rights reserved.
//

#import "MainTabBarController.h"
#import "FirstViewController.h"
#import "SecondViewController.h"
#import "ThirdViewController.h"
#import "ForthViewController.h"
#import "FifthViewController.h"
#import "SixViewController.h"
@interface MainTabBarController ()<UITabBarControllerDelegate>

@end

@implementation MainTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    FirstViewController *firstVC = [[FirstViewController alloc]init];
    UINavigationController *firstNC = [[UINavigationController alloc]initWithRootViewController:firstVC];
    firstNC.navigationBar.translucent = NO;
    firstNC.tabBarItem.title = @"基本控件";
    
    SecondViewController *secondVC = [[SecondViewController alloc]init];
    UINavigationController *secondNC = [[UINavigationController alloc]initWithRootViewController:secondVC];
    secondNC.navigationBar.translucent = NO;
    secondNC.tabBarItem.title = @"动画";
    
    ThirdViewController *thirdVC = [[ThirdViewController alloc]init];
    UINavigationController *thirdNC = [[UINavigationController alloc]initWithRootViewController:thirdVC];
    thirdNC.navigationBar.translucent = NO;
    thirdNC.tabBarItem.title = @"ScrollView";
    
    UIStoryboard *story = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
    ForthViewController *forthVC = [story instantiateViewControllerWithIdentifier:@"ForthViewController"];
    
    UINavigationController *forthNC = [[UINavigationController alloc]initWithRootViewController:forthVC];
    forthNC.navigationBar.translucent = NO;
    forthNC.tabBarItem.title = @"数据解析";
    
    FifthViewController *fifthVC = [[FifthViewController alloc]init];
    UINavigationController *fifthNC = [[UINavigationController alloc]initWithRootViewController:fifthVC];
    fifthNC.navigationBar.translucent = NO;
    fifthNC.tabBarItem.title = @"Sqlite数据库";
    
    SixViewController *sixthVC = [[SixViewController alloc]init];
    UINavigationController *sixthNC = [[UINavigationController alloc]initWithRootViewController:sixthVC];
    sixthNC.navigationBar.translucent = NO;
    sixthNC.tabBarItem.title = @"界面六";
    
    self.viewControllers = @[firstNC,secondNC,thirdNC,forthNC,fifthNC,sixthNC];
    self.delegate = self;
    
    
    
    
    
}
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController{
    //角标数据
    viewController.tabBarItem.badgeValue = nil;
}



@end
